<form [formGroup]="unitForm" style="height: 100%;">
  <div class="button-item border-spe-bottom">
    <button pButton type="text" class="ui-button-success" icon="fa fa-check" (click)="saveUpdateUnitInfo($event)"
      label="保存" [disabled]="unitForm.status != 'VALID'"></button>
    <button pButton type="text" class="ui-button-info" icon="fa fa-plus" (click)="addUnitInfo($event)"
      label="新增"></button>
    <button pButton type="text" class="ui-button-danger" icon="fa fa-trash" (click)="deleteUnitInfo($event)"
      label="删除"></button>
  </div>

  <div class="container">
    <div class="ui-g-12">
      <input type="hidden" formControlName="unitCode" />
      <div class="ui-g-6 form-control-row">
        <div class="ui-g-4">标识</div>
        <div class="ui-g-8"><input pInputText type="text" formControlName="unitId" style="width:100%" readonly /></div>
      </div>
      <div class="ui-g-6 form-control-row">
        <div class="ui-g-4">机关全称<span style="color:red;">*</span></div>
        <div class="ui-g-8"><input pInputText type="text" formControlName="unitName" style="width:100%" /></div>
      </div>
      <div class="ui-g-6 form-control-row">
        <div class="ui-g-4">机关简称</div>
        <div class="ui-g-8"><input pInputText type="text" formControlName="shortName" style="width:100%"></div>
      </div>
      <div class="ui-g-6 form-control-row">
        <div class="ui-g-4">统一社会信用代码</div>
        <div class="ui-g-8"><input pInputText type="text" formControlName="socialCreditCode" style="width:100%" /></div>
      </div>
      <div class="ui-g-6 form-control-row">
        <div class="ui-g-4">法人代表</div>
        <div class="ui-g-8"><input pInputText type="text" formControlName="representiveName" style="width:100%" /></div>
      </div>
      <div class="ui-g-6 form-control-row">
        <div class="ui-g-4">联系电话<span style="color:red;">*</span></div>
        <div class="ui-g-8"><input pInputText type="text" formControlName="officeTel" style="width:100%" /></div>
      </div>
      <div class="ui-g-6 form-control-row">
        <div class="ui-g-4">邮政编码<span style="color:red;">*</span></div>
        <div class="ui-g-8"><input pInputText type="text" formControlName="postalCode" style="width:100%" /></div>
      </div>
      <div class="ui-g-6 form-control-row">
        <div class="ui-g-4">传真</div>
        <div class="ui-g-8"><input pInputText type="text" formControlName="fax" style="width:100%" /></div>
      </div>
      <div class="ui-g-6 form-control-row">
        <div class="ui-g-4">机关性质<span style="color:red;">*</span></div>
        <div class="ui-g-8">
          <p-dropdown formControlName="unitTypeId" [options]="unitTypes" placeholder="部门性质"
            [style]="{'width':'100%'}">
          </p-dropdown>
        </div>
      </div>
      <div class="ui-g-6 form-control-row">
        <div class="ui-g-4">层级<span style="color:red;">*</span></div>
        <div class="ui-g-8">
          <p-dropdown formControlName="unitLevel" [options]="unitLevels" placeholder="部门层级" [style]="{'width':'100%'}">
          </p-dropdown>
        </div>
      </div>
      <div class="ui-g-12 form-control-row">
        <div class="ui-g-2">地址</div>
        <div class="ui-g-10"><textarea formControlName="unitAddress" pInputTextarea style="width:100%"></textarea></div>
      </div>
    </div>
  </div>
</form>
<p-confirmDialog #cd>
  <p-footer>
    <button type="button" pButton icon="fa fa-close" label="取消" (click)="cd.reject()"></button>
    <button type="button" pButton icon="fa fa-check" label="确定" (click)="cd.accept()"></button>
  </p-footer>
</p-confirmDialog>